import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import {ElementPlusResolver} from 'unplugin-vue-components/resolvers'

import { resolve } from "path";

export default defineConfig({
    plugins: [
        vue(),
        AutoImport({
            resolvers: [ElementPlusResolver()],
        }),
        Components({
            resolvers: [ElementPlusResolver()],
        })
    ],
    resolve: {
        alias: [{ find: "@", replacement: resolve(__dirname, "./src") }],
    },
    server: {
        port: 5173,
        open: true,
        openPage: "/",
        https: false,
        host: "127.0.0.1",
    }
})
